import httpFetch from 'share/httpFetch'
import config from 'config'

export default {

  //得到第三方消费列表 预订
  getThirdConsumptionList(employeeID, companyOID){
    let params = {
      companyOID,
      emnum: employeeID,
      direction: "WEB",
      realmId: config.realmIds[location.host] || config.realmId
    };
    return httpFetch.get(`${config.baseUrl}/vendor-info-service/api/sso?supplierOID=66666666-6666-11e6-9639-00ffa3fb4c67`, params)
  },
 //

  //得到第三方消费列表 订单
  getThirdConsumptionListOrder(companyOID){
    let params = {
      companyOID,
      pageType: 1001,
      direction: "WEB",
      realmId: config.realmIds[location.host] || config.realmId
    };
    return httpFetch.get(`${config.baseUrl}/vendor-info-service/api/sso?supplierOID=66666666-6666-11e6-9639-00ffa3fb4c67`, params)
  },
  thirdConsumptionLogin(url){
    let realmId = config.realmIds[location.host] || config.realmId;
    return httpFetch.get(`${config.baseUrl}${url}&realmId=${realmId}`)
  }
}
